home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Graphics⁄Sound
/
Star Stuff
/
star.notes
< prev
next >
Wrap
Text File
|
1986-03-15
|
5KB
|
78 lines
Stars.
Copyright 1986 by David Palmer
This program prints a map of a region of the sky. It has no menus, but
it does have a dialog box, which places it in minimal conformance to the
guidelines set out by The Newest Testament (Inside Mac). It is independant
of screen size, memory locations, etc., so it should run on just about anything,
but I have only tried it on a Fat Mac-.
To run this program, make sure that the files "star" (the application),
"stars.cart" (the data file), and star.res are all on the same disk under these
exact names, and then run "star". The program will put up a dialog box for
you to enter location, size, and format of the star chart. The dialog box
accepts decimal numbers, so you may enter an right ascension (R.A.) of 5h30m
as 5.5h, simply by typing that number into the Hours box.
The "Black Sky" box, when checked, causes the stars to appear as white
spots on a black background. When it is not checked, it gives black stars
on a white background. This is a better format if you want to print out the
star map (using clover-shift-shiftlock-4) because it doesn't waste ribbon
and comes out much clearer.
Clicking the Label box gives the names of all stars brighter than the
magnitude you give it. These name are all six letters, the first three being
an identifier, the second three being the constellation. Thus, Alpha Canis Majoris
(Sirius) is given as ALPCMA. This is lousy, stars should be given their proper
names instead of an ALL CAPS identifier, but that is the format in the data file
I have. Changes are invited and welcome.
North (towards Polaris) is always up, East (the direction of increasing right
ascension) is always to the left.
The star catalog has only 1573 stars, with few stars below magnitude 5.5.
This is no great problem for me, since I live near L.A. and stars dimmer than
magnitude ~3 are washed out by the "Aurora Angelinas" (the gaudy lights), but
if anyone wants to extend the catalog, be my guest. See the source code for
details on the format of the star file.
This program demonstrates two bugs in The DeSmet C compiler, which is what
I used to write it (V 1.01). Firstly, when casting a float to an int,
the compiler rounds instead of truncating. This caused great agony until I
wrote the routine "int makeint(double)", which truncates its argument. The
second bug is far more serious. Go into the source and search for the second
occurance of the word "bug". In the following lines, there is an expression
of the form A=B +- (...)/C. The +- is necessary, because otherwise the compiler
generates bad code, leaving A with the value of B. This is very bad.
This program is Copyright 1986 by David Palmer (Mail code 220-47, Caltech,
Pasadena, CA 91125) and may be given away and modified, but not sold. (Users'
groups may charge a small fee for distribution, but use for profit is a no-no) The
data in the data file is in the public domain, but I do not know where it originally
came from. It is distributed under the "Bread-On-Waters" system. All major
modifications and enhancements must be sent to the author in source form, and
I will incorporate the worthwhile ones in the next version and distribute it the
same way. I reserve the right to charge $15 for a disk with the source on it,
but the source and the compiled version will be freely distributable with only
these same conditions attatched. (i.e. If you can get the source from a bulletin
board, a club, a friend etc., you are free to do so. I just don't want to spend
all of my time copying disks.)
Suggested enhancements include
1) Positions of planets, comets (enter your own elements), and the horizon
2) A Solar to sidereal converter, allowing the output to be output in
Alt-Azimuth form, with up up, left left, and right right.
3) Clicking on a certain point should move that point to the center of
the screen. If you draw a box, the screen should zoom in on
that box.
4) Conversion to a better C compiler.
Something which is not an enhancement, but which I would still like, is a
phase of moon desk accessory, with a sidereal clock/Julian Calendar. I don't
know why I want one, but I do.
Write those enhancements, and we will have a free planetarium for everyone
to use. People will start looking at the sky more and cutting down on light
pollution. A rising tide of pro-space sentiment will sweep humanity out into
the infinite expanses of mankind's destiny. Or at least we will have something
to look at when the sky is too bright to see anything.